import request from '@/common/request.js'

// 查询船舶保养工单列表(APP)
export function getMainList(data) {
	return request({
		url: '/business/maintenance/workOrder/listForApp',
		method: 'post',
		data
	})
}

// 新增船舶保养工单
export function addWorkOrder(query) {
  return request({
    url: '/business/maintenance/workOrder/add',
    method: 'post',
    data: query
  })
}

// 查询船舶物资列表
export function getMaterialList(query) {
  return request({
    url: '/business/material/list',
    method: 'post',
    data: query
  })
}

// 查询船舶保养工单详情
export function getWorkOrderDetail(query) {
  return request({
    url: '/business/maintenance/workOrder/detail',
    method: 'post',
    data: query
  })
}

// 填写保养结果
export function setFixResult(query) {
  return request({
    url: '/business/maintenance/workOrder/maintainResult',
    method: 'post',
    data: query
  })
}


// 审批、复核保养计划
export function approveWorkOrder(query) {
  return request({
    url: '/business/maintenance/workOrder/approve',
    method: 'post',
    data: query
  })
}
// 验收保养结果
export function checkResult(query) {
  return request({
    url: '/business/maintenance/workOrder/checkResult',
    method: 'post',
    data: query
  })
}

// 查询上次工单保养项目列表
export function queryLastProjects(query) {
  return request({
    url: '/business/maintenance/workOrder/queryLastProjects',
    method: 'post',
    data: query
  })
}